﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using NUnit.Framework;

using ReferenceSwap;

namespace ReferenceSwap.Tests
{
    [TestFixture]
    public class ProjectReferenceFixture
    {
        [Test]
        public void TestProjectReferenceParse()
        {
            string expectedName = "ReferenceSwap";
            string expectedPath = @"..\ReferenceSwap\ReferenceSwap.csproj";
            string expectedGuid = "{F74218FC-40FF-4BD7-A19A-910FE563B641}";

            var project = new ProjectData(@"..\..\ReferenceSwap.Tests.csproj");
            Assert.Greater(project.ProjectReferences.Count, 0);
            var target = project.ProjectReferences[0];

            Assert.AreEqual(expectedName, target.Name);
            Assert.AreEqual(expectedPath, target.Path);
            Assert.AreEqual(expectedGuid, target.Guid.ToUpper());
        }
    }
}
